<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>8.1函数的二种定义方式</title>
    <script type="text/javascript">
        // 1.方式一
        function sum(num1, num2) {
            var result = num1 + num2;
            return result;
        }

        alert(sum(100, 50));

        // 2.方式二
        var fun3 = function (num1, num2) {
            return num1 + num2;
        }
        alert(fun3(100, 200))
    </script>
</head>
<body>

</body>
</html>